package zdream.pmfield.stage.action;

/**
 * @author Zdream
 * @date 2023-11-13
 * @since 0.0.1
 */
public abstract class StageAction {
	/**
	 * 用于排序的时候, 同时间触发的 action 不会被打乱
	 */
	public abstract int getInnerId();

	public boolean isForAttack() {
		return false;
	}

	public boolean isForBuff() {
		return false;
	}

	public boolean isForMovement() {
		return false;
	}

	public boolean isForDaze() {
		return false;
	}

	public AttackAction asAttack() {
		throw new IllegalArgumentException(
				getClass().getSimpleName() + " is not a " + AttackAction.class.getSimpleName());
	}

	public BuffAction asBuff() {
		throw new IllegalArgumentException(
				getClass().getSimpleName() + " is not a " + BuffAction.class.getSimpleName());
	}

	public MovementAction asMovement() {
		throw new IllegalArgumentException(
				getClass().getSimpleName() + " is not a " + MovementAction.class.getSimpleName());
	}

	public DazeAction asDaze() {
		throw new IllegalArgumentException(
				getClass().getSimpleName() + " is not a " + DazeAction.class.getSimpleName());
	}

	public StageAction copy() {
		throw new RuntimeException("failed to create StageAction copy");
	}
}
